﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Controls;

namespace WpfBeyond
{
    class ebm_class
    {
        public string Name { get; set; }
        public int Value { get; set; }
    }

    class ebm_class_list : List<ebm_class>
    {
        public ebm_class_list(ComboBox cmb)
        {
            this.Add(new ebm_class { Name = "发布系统演练", Value = 1 });
            this.Add(new ebm_class { Name = "模拟演练", Value = 2 });
            this.Add(new ebm_class { Name = "实际演练", Value = 3 });
            this.Add(new ebm_class { Name = "应急广播", Value = 4 });
            this.Add(new ebm_class { Name = "日常广播", Value = 5 });

            cmb.ItemsSource = this;
            cmb.DisplayMemberPath = "Name";//显示出来的值
            cmb.SelectedValuePath = "Value";//实际选中后获取的结果的值

            cmb.SelectedIndex = 4;//默认选项
        }
    }

    class ebm_level
    {
        public string Name { get; set; }
        public int Value { get; set; }
    }

    class ebm_level_list : List<ebm_level>
    {
        public ebm_level_list(ComboBox cmb)
        {
            this.Add(new ebm_level { Name = "1 级（特别重大）", Value = 1 });
            this.Add(new ebm_level { Name = "2 级（重大）", Value = 2 });
            this.Add(new ebm_level { Name = "3 级（较大）", Value = 3 });
            this.Add(new ebm_level { Name = "4 级（一般）", Value = 4 });

            cmb.ItemsSource = this;
            //这里的Name和Value不能乱填哦
            cmb.DisplayMemberPath = "Name";//显示出来的值
            cmb.SelectedValuePath = "Value";//实际选中后获取的结果的值
            cmb.SelectedIndex = 1;
        }

    }

    class ebm_source
    {
        public string Name { get; set; }
        public int Value { get; set; }
    }

    class ebm_source_list : List<ebm_source>
    {
        public ebm_source_list(ComboBox cmb)
        {
            this.Add(new ebm_source { Name = "麦克风", Value = 1 });
            this.Add(new ebm_source { Name = "音频文件", Value = 2 });
            this.Add(new ebm_source { Name = "混音", Value = 3 });

            cmb.ItemsSource = this;
            cmb.DisplayMemberPath = "Name";//显示出来的值
            cmb.SelectedValuePath = "Value";//实际选中后获取的结果的值
            cmb.SelectedIndex = 1;
        }
    }

    class audio_device_name
    {
        public string Name { get; set; }
        public string Value { get; set; }
    }

    class playmode
    {
        public string Name { get; set; }
        public int Value { get; set; }
    }

    class play_mode_list : List<playmode>
    {
        public play_mode_list(ComboBox cmb)
        {
            this.Add(new playmode { Name = "立即播放", Value = 1 });
            this.Add(new playmode { Name = "定时播放", Value = 2 });

            cmb.ItemsSource = this;
            cmb.DisplayMemberPath = "Name";//显示出来的值
            cmb.SelectedValuePath = "Value";//实际选中后获取的结果的值
            cmb.SelectedIndex = 0;
        }
    }

    class reback_type
    {
        public string Name { get; set; }
        public int Value { get; set; }
    }

    class Reback_type_list : List<reback_type>
    {
        public Reback_type_list(ComboBox cmb)
        {
            this.Add(new reback_type { Name = "IP地址", Value = 1 });
            this.Add(new reback_type { Name = "域名地址", Value = 2 });
            this.Add(new reback_type { Name = "手机短信", Value = 3 });

            cmb.ItemsSource = this;
            cmb.DisplayMemberPath = "Name";//显示出来的值
            cmb.SelectedValuePath = "Value";//实际选中后获取的结果的值            
        }
    }

    class ffmpeg_mode
    {
        public string Name { get; set; }
        public int Value { get; set; }
    }

    class ffmpeg_mode_list : List<ffmpeg_mode>
    {
        public ffmpeg_mode_list(ComboBox cmb)
        {
            this.Add(new ffmpeg_mode { Name = "RTP组播", Value = 1 });
            this.Add(new ffmpeg_mode { Name = "UDP单播", Value = 2 });

            cmb.ItemsSource = this;
            cmb.DisplayMemberPath = "Name";//显示出来的值
            cmb.SelectedValuePath = "Value";//实际选中后获取的结果的值         
        }
    }

}
